﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using dpdw.Structure.AdapterPattern;

namespace dpdw.testing.Structure
{
    [TestClass]
    public class TestAdapterPattern
    {
        [TestMethod]
        public void TestAdapterPatternMethod1()
        {
            System.Diagnostics.Trace.WriteLine("\r\n" + "TestAdapterPatternMethod1");

            MallardDuck duck = new MallardDuck();

            WildTurkey turkey = new WildTurkey();
            Duck turkeyAdapter = new TurkeyAdaper(turkey);

            System.Diagnostics.Trace.WriteLine("The MallardDuck says...");
            duck.Quack();
            duck.Fly();

            System.Diagnostics.Trace.WriteLine("The WildTurkey says...");
            turkey.Gobble();
            turkey.Fly();

            System.Diagnostics.Trace.WriteLine("The TurkeyAdaper says...");
            turkeyAdapter.Quack();
            turkeyAdapter.Fly();
        }
    }
}
